<!DOCTYPE html>
<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <title>dome1</title>
    <style type="text/css">
        .abc { position: absolute; width: 50px; height: 50px; background: #ccc; border-radius: 15px; }
    </style>
</head>
<body>
<div class="abc"></div>
<div class="abc"></div>
<div class="abc"></div>
<div class="abc"></div>
<div class="abc"></div>
<script type="text/javascript">
    var abc = document.querySelectorAll('.abc');
    function addEvent(element, type, handler){
         if (element.addEventListener){
            element.addEventListener(type, handler, false);
        } else if (element.attachEvent){
            element.attachEvent("on" + type, handler);
        } else {
            element["on" + type] = handler;
        }
    }
    addEvent(document,'mousemove',handler);
    function handler(e) {
        setTimeout(function() {
                move(0, e);
         }, 100);
    }
    function move(i, e) {
        abc[i].style.left = i * 50 + e.clientX + 'px';
        abc[i].style.top = e.clientY + 'px';
        if(i<abc.length-1){
            setTimeout(function() {
                move(++i,e);
            }, 100)
        }
    }
</script>

</body>
</html>